home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette: SID64
/
SID64.D64
/
sid demo.64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
67 lines
100 print chr$(147):print " sidplayer demonstration"
110 print " by craig chamberlain":print
120 dn=8:sa=780:sx=781:sy=782:sp=783
130 cy=214:dim c$(15):for k=0 to 15:read p:c$(k)=chr$(p):next
140 gosub 57000:f$="scipio":la=peek(49)+256*peek(50)+1000:gosub 57500
150 sys hk:poke sx,lo:poke sy,hi:sys pl:rem ready to play song
200 print chr$(147):poke 53280,0:poke 53281,0
210 for k=832 to 894:read p:poke k,p:next:rem define sprite
220 for k=0 to 7:poke 2040+k,13:read c:poke 53287+k,c
230 poke 53248+k*2,(34+k*40)and255:poke 53249+k*2,70+rnd(0)*20:next
240 poke 53264,192:poke 53271,0:poke 53277,0
250 for k=1 to 3:poke cy,3:print:print tab(5) c$(k) "presenting..."
260 for j=1 to 20:next j,k:for k=1 to 750:next
270 for k=0 to 3:poke cy,3:print:print tab(5) c$(3-k) "presenting..."
280 for j=1 to 20:next j,k:for k=1 to 300:next:poke ss,7
300 for k=1 to 3:poke cy,6:print
310 if peek(fl)<>k goto 310
320 print tab(10) c$(k) "enhanced sidplayer":next:wait fl,1,1:print:print
330 wait fl,1:print tab(10) "a complete":print tab(10) "music system"
340 print tab(10) "for the commodore 64"
400 wait fl,1,1:print chr$(147):poke 53269,255:poke cy,8:print
410 print "features:":print:print "joystick or keyboard note entry":print
415 print "supports any time signature":print
420 print "measure editing":print:print "transposing by half steps":print
430 print "easy insert/delete/replace editing":print
440 print "simple enough for a novice to use":print
450 poke 53249+int(rnd(0)*8)*2,70+rnd(0)*20:if peek(fl)=0 goto 450
500 poke 53269,0:print chr$(147):print:print:print "plus..."
510 for k=5 to 13 step 2:read s$:poke cy,k:print:print tab(10) s$
520 poke cy,k:print:print tab(10);:for j=1 to 10:print chr$(20);
530 for i=1 to 32:next i,j,k:print:print:print
540 wait fl,1,1:print "and best of all,":print "music created by sidplayer"
550 print "can be merged with":print "your basic programs":wait fl,1
600 print chr$(147):poke cy,10:print:print " sidplayer";:wait fl,1,1
610 print tab(15) "sidplayer";:wait fl,1:print tab(30) "sidplayer":wait fl,1,1
630 print chr$(147):for k=1 to 23:print c$(rnd(0)*12+4) " sidplayer"
640 for j=1 to 30:next j,k
650 for k=22 to 0 step -1:poke cy,k:print
660 print tab(15) c$(rnd(1)*12+4) "sidplayer":for j=1 to 30:next j,k
670 poke cy,0:print:for k=1 to 23:print c$(rnd(0)*12+4) tab(30) "sidplayer"
680 for j=1 to 30:next j,k
690 if peek(fl)<>1 goto 690
700 print chr$(147):poke cy,16:print:print tab(25) c$(3) "that's":wait fl,1,1
710 print tab(27) "all,":wait fl,1:print tab(25) "folks!"
720 if peek(ss)and7 goto 720
730 sys hu:sys dp:print chr$(147) chr$(154);:poke 53280,14:poke 53281,6:end
800 data 144,151,152,155,5,28,30,31,129,149,150,153,154,156,158,159
810 data 0,3,192,0,3,224,0,3,240,0,3,120,0,3,56,0,3,28,0,3,12,0,3,0,0,3,0
820 data 0,3,0,7,227,0,31,251,0,63,255,0,127,255,0,127,255,0,127,254,0
830 data 63,252,0,31,248,0,7,224,0,0,0,0,0,0,0
840 data 10,7,4,13,5,3,8,15
850 data "envelopes and waveforms","repeats and phrases"
860 data "automatic filter mode","glissando and vibrato"
870 data "many other features"
57000 poke sa,1:poke sx,dn:poke sy,1:sys 65466:f$="sid.obj.64":gosub 59000
57010 poke sa,0:sys 65493:if peek(sp)and1 goto 59100
57020 ss=49152:fl=49153:hk=49615:pl=49664:hu=49897:dp=49935:return
57500 poke sa,1:poke sx,dn:poke sy,0:sys 65466:f$=f$+".mus":gosub 59000
57510 hi=int(la/256):lo=la-256*hi
57520 poke sa,0:poke sx,lo:poke sy,hi:sys 65493:if peek(sp)and1 goto 59100
57530 la=peek(sx)+256*peek(sy):return
59000 for k=1 to len(f$):poke 584+k,asc(mid$(f$,k)):next
59010 poke sa,len(f$):poke sx,73:poke sy,2:sys 65469:return
59100 p=peek(sa):print " error: ";:if p=4 then print "file not found":end
59110 if p=5 then print "device not present":end
59120 print st:end